window.onload = function () {
  //判断浏览器对HTML5地理定位API的支持情况
  function test () {
    //判断geolocation对象是否存在
    if (navigator.geolocation) {
      document.querySelector('.support').innerHTML = '您的浏览器支持HTML5定位';
    } else {
      document.querySelector('.support').innerHTML = '您的浏览器不支持HTML5定位';
    }
  }
  test();

  var x = document.querySelector('.location');
  function getLocation () {
    navigator.geolocation.getCurrentPosition(showPositon)
  }
  function showPositon (position) {
    x.innerHTML = "您的纬度是：" + position.coords.latitude + "<br/>您的经度是：" + position.coords.longitude;
  }

  getLocation();

  
  var btn = document.querySelector('.btn');
  
  var flag = 0;
  var timer = null;
  btn.addEventListener('click', function () {
    console.log()
  }
  );
  function getNowFormatDate() {
    var date = new Date();
    var seperator1 = "-";
    var seperator2 = ":";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month >= 1 && month <= 9) {
    month = "0" + month;
    }
    
    if (strDate >= 0 && strDate <= 9) {
    strDate = "0" + strDate;
    }
    
    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate + " " + date.getHours() + seperator2 + date.getMinutes()+ seperator2 + date.getSeconds();
    return currentdate;
    }
  var date = new Date();
  
  
  
}